import { request } from '@/utils'

export default {
  getArticles: (params = {}) => request.post('article/list', params),
  getDepartments: () => request.get('department/list'),
  getPostById: (id) => request.get(`/post/${id}`),
  addPost: (data) => request.post('/post', data),
  updateArticle: (data) => request.post(`/article/update`, data),
  deleteArticle: (id) => request.post(`/article/delete/${id}`),
}
